package src.main.shengchengqi;

//定义一个统一调度类也叫指挥者（Director）.是对生成器接口IBuilder的封装。
public class Director {
    private IBuild build;
    public Director(IBuild build){
        this.build = build;
    }
    public Product build(){
      return  build.create();
    }

    public static void main(String[] args) {
        IBuild build = new BuildProduct();
        Director director = new Director(build);
        Product p = director.build();
        System.out.println(p.toString());
    }

}
